import React, {useEffect} from 'react'
import TodoForm from '../components/TodoForm'
import {useStore} from '../store'

export default function TodoEdit() {
  const store = useStore()

  useEffect(() => {
    console.log('edit')
  }, [])

  const editSubmit = (todo) => {
    store.todoStore.editTodo(todo)//表单获取的东西上传
  }

  return (
    <div>
      <h3>编辑</h3>

      <TodoForm onClick={editSubmit}></TodoForm>
    </div>
  )
}
